package Pursuit_Client;

/**
 * @author Duyun
 *
 */

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

public class PursuitServerConsole extends JFrame {
	
	private static final long serialVersionUID = 7082778273310829166L;
	private JScrollPane consoleScrollPane;
	private JTextArea console = new JTextArea(15,30);
	
	public PursuitServerConsole() {
		super("Pursuit Server Console");
    	setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
    	setResizable(false);
    	console.setWrapStyleWord(true);
    	consoleScrollPane = new JScrollPane(console, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
    														JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
		add(consoleScrollPane);
		pack();
		setVisible(false);
	}
	
	public synchronized void print(String s) {
		console.append(s + '\n');
	}

}
